import { createRouter, createWebHistory } from 'vue-router'
import Login from '../components/Login.vue'

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: '/login',
      name: 'login',
      component: Login
    },
    
    {
      path: '/',
      name: 'home',
      component: () => import('../views/Home.vue')
    },

    {
      path: '/dishcomment',
      name: 'dishcomment',
      component: () => import('../views/dishcomment.vue')
    },
    
    // {
    //   path: '/view/:id',
    //   component: r => require.ensure([], () => r(require('@/views/blog/BlogView')), 'blogview')
    // },
    
    {
      path:'/register',
      component: () => import('../components/Register.vue')
    }
  ]
})

export default router
